package cn.wolfcode.domain;

import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class ConsumptionItem extends ConsumptionItemKey {
//    private Long category_id;
    private SystemDictionaryItem category;

//    private Long category_item_id;
    private SystemDictionaryItem category_item;

//    private Long pay_type_id;
    private SystemDictionaryItem pay_type;

    private BigDecimal amount;

    private BigDecimal pay_amount;

    private BigDecimal discount_amount;

//    private Long create_user_id;
    private Employee create_user;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date create_time;

    private String cno;

    public ConsumptionItem(SystemDictionaryItem category, SystemDictionaryItem category_item, SystemDictionaryItem pay_type, BigDecimal amount, BigDecimal pay_amount, BigDecimal discount_amount) {
        this.category = category;
        this.category_item = category_item;
        this.pay_type = pay_type;
        this.amount = amount;
        this.pay_amount = pay_amount;
        this.discount_amount = discount_amount;
    }
}